package cn.controllor.req;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/req")
public class MethodController {
    @GetMapping("/method")
    public void get(){
        System.out.println("只能处理get请求！");
    }
    @PostMapping("/method")
    public void post(){
        System.out.println("只能处理post请求！");
    }
    @PutMapping("/method")
    public void put(){
        System.out.println("只能处理put请求！");
    }
    @DeleteMapping("/method")
    public void delete(){
        System.out.println("只能处理delete请求！");
    }
    @PatchMapping("/method")
    public void patch(){
        System.out.println("只能处理patch请求！");
    }
}
